package com.example.floatingpopulation.mapper;

import com.example.floatingpopulation.controller.request.BaseRequest;
import com.example.floatingpopulation.controller.request.LoginRequest;
import com.example.floatingpopulation.entity.Admin;
import com.example.floatingpopulation.entity.Password;
import com.example.floatingpopulation.entity.Permissions;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface AdminMapper {
    List<Admin> list();

    List<Admin> listByCondition(BaseRequest baseRequest);

    void save(Admin obj);

    void updateById(Admin obj);

    void deleteById(Integer id);

    Admin getByAdminNameAndPassword(LoginRequest request);

    Admin getById(Integer id);

    Permissions getPermissions(String isAdmin);

    void resetPassword(Admin admin);

    void updatePassword(Password password);

}
